package com.demo.mapper;

import com.demo.pojo.entity.Teacher;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
* @author lenovo
* @description 针对表【teacher】的数据库操作Mapper
* @createDate 2025-09-11 17:15:14
* @Entity com.demo.pojo.entity.Teacher
*/
@Mapper
public interface TeacherMapper extends BaseMapper<Teacher> {


    @Select("select * from teacher where teacher_id = #{id}")
    Teacher selectById2(Integer id);

    /**
     * 根据教师工号查询（区分大小写）
     * 使用BINARY关键字确保精确匹配
     */
    @Select("select * from teacher where BINARY te_no = #{teNo}")
    Teacher selectByNO(Long teNo);
}




